package com.sobjal.android.devices;

/**
 * Define a device and its proprieties
 * 
 * @author Fabio Monteiro, based on Lionel Rywalski
 * @version 1.0
 *
 */
public class Device {

	private String  idDevice;
	private long idUser;
	private String devicetype; 
	private String name;
	
	//empty constructor
	public Device (){ }

	/**
	 * Returns a exact copy of a device
	 * 
	 * @return
	 */
	public Device copy(){
		Device copy = new Device();
		copy.name = name;
		copy.devicetype = devicetype;
		copy.idDevice = idDevice;
		copy.idUser = idUser;
	
		return copy;
	}
	/**
	 * creates a new device
	 * 
	 * @param idDevice
	 * @param idUser
	 * @param type
	 * @param name
	 */
	public Device(String idDevice, long idUser, DeviceType type, String name) {
		this.idDevice = idDevice;
		this.idUser = idUser;
		this.name = name;
	}
	

	public String toString() {
		String ret = "";
		ret += " idDevice : " + idDevice;
		ret += " idUser : " + idUser;
		
		return ret;
	}

	//setters
	/**
	 * sets the Id of the device
	 * 
	 */
	public void setIdDevice(String idDevice) {
		this.idDevice = idDevice;
	}
	
	/**
	 * sets TheIdUser
	 * 
	 * @param idUser
	 */
	public void setIdUser(long idUser) {
		this.idUser = idUser;
	}
	
	/**
	 * sets the devicetype
	 * 
	 * @param devicetype
	 */
	public void setDevicetype(String devicetype) {
		this.devicetype = devicetype;
	}
	/**
	 * sets the name
	 * 
	 * @param name
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	//getters
	public String getDeviceType(){
		return devicetype;
	}
	/**
	 * @return the idDevice
	 */
	public String getIdDevice() {
		return idDevice;
	}

	/**
	 * @return the idUser
	 */
	public Long getIdUser() {
		return idUser;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

}